﻿using Abp.Application.Services;
using FwProject.Com.Dto;
using FwProject.ShopApplication;
using FwProject.ShoppingMall.EventAdvertising;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using X.PagedList;

namespace FwProject.Com.Dto
{
    /// <summary>
    /// 供应商管理
    /// </summary>
   public interface IShopSupplierAppService : IApplicationService
    {
        #region 供应商管理
        /// <summary>
        /// 创建一个供应商
        /// </summary>
        /// <param name="Input">供应商模型</param>
        /// <returns></returns>
        Task<Guid> CreateShopSupplier(ShopSupplierInput Input);
        /// <summary>
        /// 修改一个供应商
        /// </summary>
        /// <param name="Id">主键</param>
        /// <param name="Input">模型</param>
        /// <returns></returns>
        Task EditShopAdLocation(Guid Id, ShopSupplierInput Input);
        /// <summary>
        /// 删除一个供应商
        /// </summary>
        /// <param name="Id">主键</param>
        /// <returns></returns>
        Task DeleteAdLocation(Guid Id);
        /// <summary>
        /// 供应商列表
        /// </summary>
        /// <param name="page">分页</param>
        /// <param name="pageSize">条数</param>
        /// <param name="SupplierName">供应商名称</param>
        /// <param name="beginTime">创建时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="IsActive">是否激活</param>
        /// <returns></returns>
        Task<IPagedList<ShopSupplierDto>> GetPageList(int page, int pageSize, string SupplierName, DateTime? beginTime, DateTime? endTime, bool? IsActive);


        #endregion

        Task<ShopSupplierDto> GetByIdAsync(Guid id);
        /// <summary>
        /// 获取一个供应商对象
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns></returns>
        Task<ShopSupplierInput> GetEnterDtoAsync(Guid id);
        /// <summary>
        /// 后台获取供应商列表
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="keyword"></param>
        /// <returns></returns>
        Task<LayerDataBaseDto> GetSupplierLayerDataAsync(int page, int limit, string keyword);
        /// <summary>
        /// 供应商的激活状态调整
        /// </summary>
        /// <param name="id"></param>
        /// <param name="active"></param>
        /// <returns></returns>
        Task SwitchActive(Guid id, bool active);

        /// <summary>
        /// 获取供应商列表
        /// </summary>
        /// <returns></returns>
        Task<List<ShopSupplierDto>> GetListAsync();
    }
}
